<div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url("admini")?>">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="<?=site_url("admini/user/index")?>">用户管理</a><span class="crumb-step">&gt;</span><span>新增用户</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="<?=site_url('admini/user/create')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                                <th><i class="require-red">*</i>用户账号：</th>
                                <td>
                                    <input class="common-text required" id="title" name="username" size="50" value="" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>用户密码：</th>
                                <td>
                                    <input class="common-text required" id="title" name="password1" size="50" value="" type="password">
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>重复密码：</th>
                                <td>
                                    <input class="common-text required" id="title" name="password2" size="50" value="" type="password">
                                </td>
                            </tr>
                            <tr>
                                <th>用户昵称：</th>
                                <td><input class="common-text" name="nickname" size="50" value="" type="text"></td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>用户邮箱：</th>
                                <td><input class="common-text" name="mail" size="50" value="" type="text"></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>
<script>
//ajax 提交分类数据
$('#myform').submit(function() {
    $(this).ajaxSubmit(function(data){
        if(data == 1){
            layer.alert('操作成功！',{
                icon:1,
            },function(){
            	window.location.href="<?=site_url('admini/user/index')?>";
            });
        }else{
            layer.alert(data,{
                icon:2,
            });
        }
    })
    return false;
})

</script>